
const crypto = require('crypto-js');

let password = 'gushihao';
let text = '顾世豪';

console.log('MD5: ' + crypto.MD5(text).toString());
console.log('SHA256: ' + crypto.SHA256(text).toString());
console.log('SHA512: ' + crypto.SHA512(text).toString());

let mw = crypto.AES.encrypt(text, password).toString();
console.log('AES: ' + mw);
let yw = crypto.AES.decrypt(mw, password).toString(crypto.enc.Utf8);
console.log(yw);